<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8" />
<title>代理商品 - 升级设置</title>
<?php include($this->c['_homes']['_viewsHome'].'/_global/_head.php');?>
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/head.php');?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container" > 
  <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
  <?php include($this->c['_homes']['_viewsHome'].'/_global/menu.php');?>
  <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR --> 
  <!-- BEGIN PAGE -->
  <div class="page-content"> 
    <!-- BEGIN PAGE HEADER-->
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <h3 class="page-title"> 升级设置 </h3>
        <ul class="page-breadcrumb breadcrumb">
          
          <li class="btn-group">
            <button type="button" class="btn blue dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-delay="1000" data-close-others="true"> <span>操作</span> <i class="icon-angle-down"></i> </button>
            <ul class="dropdown-menu pull-right" role="menu">
              <li><a href="/agent/settingadd"><i class="icon-plus"></i> 新增设置</a></li>
            </ul>
          </li>
          <li> <i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i> </li>
          <li> 代理商品 <i class="icon-angle-right"></i> </li>
          <li>升级设置</li>
        </ul>
        <!-- END PAGE TITLE & BREADCRUMB--> 
      </div>
    </div>
    <!-- END PAGE HEADER--> 
    <!-- BEGIN PAGE CONTENT-->
    
    <div class="row">
      <div class="col-md-12"> 
        <!-- BEGIN SAMPLE TABLE PORTLET-->
        <div class="portlet box blue">
          <div class="portlet-title">
            <div class="caption"><i class="page-title"></i>升级设置</div>
            <div class="tools"> <a href="javascript:;" class="collapse"></a> </div>
          </div>
          <div class="portlet-body">
            <div class="table-responsive">
             <table class="table">
              <thead>
                <tr>
                  <th>编号</th>
                  <th>产品及数量</th>                 
                  <th>状态</th>                 
                  <th>操作</th>
                </tr>
              </thead>
              <?php
                  foreach($this->c['agent_level'] as $k=>$g){

                    if($k>1 && $k<5)
                    {


                  ?>
                <tbody>
                  <tr>
                    <td colspan="7" class="note note-info"><?=$g;?></td>
                  </tr>
                </tbody>
              <?php
                if($this->data['data'][$k])
                {
                  ?>
              <tbody>
                <?
                  foreach($this->data['data'][$k] as $s=> $r){
                    

                    $json = json_decode($r['content'],true);
                ?>
                <tr>
                  <td><?=$r['id'];?></td>
                  <td><?php
                  foreach($json as $d)
                  {
                    if($d['id']!="")
                    {
                      echo $this->data['goods'][$d['id']]." <font style=\"color:#c40000;font-weight:bold; font-size:18px;\">".$d['number']."</font><br />";
                    }
                  }
                  ?></td>
                  <td><?=$this->c['stat']['normal'][$r['status']];?></td>                  
                  <td>                    
                    <a href="settingedit?id=<?=$r['id'];?>" class="btn btn-xs blue"><i class="icon-edit"></i> 编辑</a>
                  </td>
                </tr>
                <?
                    }
                  }
                  ?>
              </tbody>
              <?
                  }
                
                }
                ?>
            </table>
            </div>
          </div>
        </div>
        <!-- END SAMPLE TABLE PORTLET--> 
      </div>
    </div>
    <!-- END PAGE CONTENT--> 
  </div>
  <!-- END PAGE --> 
</div>
<!-- END CONTAINER -->
<?php include($this->c['_homes']['_viewsHome'].'/_global/_footer.php');?>
<script>
    jQuery(document).ready(function() {    
       App.init();
    });
  </script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>